package com.ruoyi.web.controller.his;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.his.domain.OdsDoctorData;
import com.ruoyi.his.domain.OdsHospitalData;
import com.ruoyi.his.domain.vo.ReVillageVo;
import com.ruoyi.his.service.IOdsDoctorDataService;
import com.ruoyi.his.service.IOdsHospitalDataService;
import com.ruoyi.system.service.ISysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;

import javax.swing.text.TabableView;
import java.util.List;

@RestController
@RequestMapping("/his/register")
public class HisOdsHospitalController {
    @Autowired
    private  IOdsHospitalDataService iOdsHospitalDataService;
    @Autowired
    private IOdsDoctorDataService iDoctorDataService;

    /**
     * 医院的注册业务
     * @param odsHospitalData
     * @return
     */
    @PostMapping("/registerHospital")
    public AjaxResult register(@RequestBody OdsHospitalData odsHospitalData){
        return iOdsHospitalDataService.registerHospital(odsHospitalData);
    }

    /**
     * 医生的注册业务
     * @param odsDoctorData
     * @return
     */
    @PostMapping("/registerDoctor")
    @Transactional
    public AjaxResult registerDocktor(@RequestBody OdsDoctorData odsDoctorData){
        return iDoctorDataService.registerDoctorByLicence(odsDoctorData);
    }

}


